﻿using System.Web.Mvc;
using Spark.Web.Mvc;
using StructureMap;
using Wayloop.Blog.Core.Services;


namespace Wayloop.Blog.Presentation
{
    public abstract class CustomSparkView : SparkView
    {
        /// <summary>
        /// Gets or sets the <see cref="IConfigurationService"/> instance.
        /// </summary>
        /// <value>The <see cref="IConfigurationService"/> instance.</value>
        public IConfigurationService Configuration { get; set; }


        /// <summary>
        /// Sets the view data.
        /// </summary>
        /// <param name="viewData">The view data.</param>
        protected override void SetViewData(ViewDataDictionary viewData)
        {
            Configuration = ObjectFactory.GetInstance<IConfigurationService>();
            base.SetViewData(viewData);
        }
    }
}